package com.warm.test.scheduling;

import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Component;
import org.noear.solon.scheduling.annotation.Async;

/**
 * 定义异步执行的服务
 *
 * @author warm
 */
@Slf4j
@Component
public class AsyncTask {
    /**
     * 会被异步运行（提交到异步执行器运行）//不要返回值（返回也拿不到）, 煦要开启启动类中@EnableAsync
     *
     * @author warm
     */
    @Async
    public void test(String hint) {
        log.info("进入异步AsyncTask,线程为：{}", Thread.currentThread().getName());
    }
}